//
//  HttpClient.h
//  LineByLine
//
//  Created by 병철 김 on 11. 10. 18..
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QHTTPOperation.h"


@interface HttpRequest : NSObject {
    id finishTarget;
    SEL finishAction;
    NSString *url;
    NSString *method;
    NSMutableDictionary *params;
    NSMutableDictionary *headers;
    NSMutableDictionary *cookies;
    NSOutputStream *outputStream;
    
    QHTTPOperation *httpOperation;
}

- (void) execute;
- (void) executeUrl:(NSString*) _url method:(NSString*) _method params:(NSString*)param, ...;
- (void) setParamsKeyValue:(NSString*) param, ...;
- (void) setHeadersKeyValue:(NSString*) header, ...;
- (void) setCookiesKeyValue:(NSString*) cookie, ...;
- (void) setFinishTarget:(id) _finishTarget action:(SEL) _finishAction;
- (NSOutputStream*) outputStream;
- (void) setOutputStream:(NSOutputStream*) outputStream;
- (void) close;

@property (assign, nonatomic) NSInteger requestId;
@property (retain, nonatomic) NSString* url;
@property (retain, nonatomic) NSString *method;
@property (retain, nonatomic) NSDictionary *params;
@property (retain, nonatomic) NSDictionary *headers;
@property (retain, nonatomic) NSDictionary *cookies;
@property (readonly, nonatomic) NSData *responseData;
@end

